# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=libnids
pkgver=1.26
pkgrel=0
pkgdesc="An implementation of an E-component of Network Intrusion Detection System."
url="http://libnids.sourceforge.net"
arch="all"
license="GPL-2.0-only"
options="!check" #no test/check provided
makedepends="libnet-dev libpcap-dev glib-dev"
subpackages="$pkgname-dev $pkgname-doc"
source="$pkgname-$pkgver.tar.gz::https://github.com/MITRECND/libnids/archive/$pkgver.tar.gz"

prepare() {
	default_prepare
	update_config_sub
}

build() {
	./configure \
		--prefix=/usr \
		--man=/usr/share/man \
		--enable-shared
	make
}

package() {
	make install_prefix=$pkgdir install
	ln -s libnids.so.1.25 $pkgdir/usr/lib/libnids.so.1
}

sha512sums="
d582287f2c64241895ae437e501e92ef68adc8eac1a3df597d089634b994faee35d8b1cc018bbf20ced440bcd286af28f48c6f88da740a7c3de935ce3723561d  libnids-1.26.tar.gz
"
